This README-file explains how to replicate the findings in the article "A CREDIBLE CHANGE: HOW PARTIES USE ELECTION PROMISES TO COUNTERACT THE LOSS OF REPUTATION WHEN THEY DILUTE THEIR POLICY POSITIONS (PUBLISHED IN POLITICAL COMMUNICATION)"

1. DATA SOURCES
The do-file uses the following data sources:

A) Party facts. Was downloaded from this URL: https://partyfacts.herokuapp.com/download/external-parties-csv/. Download does not require login.

B) Comparative Manifesto Project. Version: 2020b. Name of downloaded datafile: MPDataset_MPDS2020b_stata14.dta. Was downloaded from this URL: https://manifesto-project.wzb.eu/down/data/2020b/datasets/MPDataset_MPDS2020b_stata14.dta. Download require login but is free of charge.

C) ParlGov. Version: 2024-08-12. Was downloaded from Harvard Dataverse (Holger Döring Dataverse) on this URL: https://dataverse.harvard.edu/api/access/datafile/10437092. Download does not require login.

D) PolCommit. Versions: polcommit_v2.0.csv. Was downloaded from Harvard Dataverse (Mathias Bukh Vestergaard Dataverse) on this URL: https://dataverse.harvard.edu/api/access/datafile/10951688. Download does not require login.

All datasets except one are downloaded automatically when running the do-file. The Comparative Manifesto Project is included in the replication folder, as it cannot be downloaded via the do-file (because it requires login).

2. COMPUTATIONAL REQUIREMENTS
STATA is required to run the do-file, but no user-written packages are needed.

R is used to run one robustness analysis (when calculating fixed effects using within-entity demeaning). I use four packages in R to run this analysis: fixest, modelsummary, flextable, and dplyr.

3. INSTRUCTIONS FOR DATA PREPARATION AND ANALYSIS
All the relevant files are in the replication folder. Additional files will be generated when running the STATA-do-file ("master.do"). Before running this do-file, please change the directory folder in the cd command at the top of the do-file. This should be changed to the path where the replication folder is located. After running the STATA-do-file, the R-script ("fixest") can be run (it relies on the "analysis.dta" file that is generated when running the do-file).

4. LIST OF CONTENTS:
The folder contains the following files before running the code:

A) us.dta. A dataset that supplements the ParlGov dataset with information about the presidential party in the United States. 

B) MPDataset_MPDS2020b_stata14. A dataset with information about political parties manifestoes. See more info under DATA SOURCES above.

C) cmp.xlsx. A dataset with info about different issue categories from the Comparative Manifesto Project, and how these categories are combined in the analyses.

D) master.do. A STATA-do-file with code on how to create the variables as well as the analyses. 

E) fixest.R. An R-script file with code on how to run one of the robustness analyses (when calculating fixed effects using within-entity demeaning).

F) README. This file with info about the data analyses.

After running the do-file, additional files will be generated and put into two different folders: do-file. .dta, .csv, and .tab files will be added to "data"-folder. .rtf and .svg files will be added to "output"-folder.
